package com.ruoyi.system.product.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.product.mapper.ServiceBookProductSaleMapper;
import com.ruoyi.system.product.domain.ServiceBookProductSale;
import com.ruoyi.system.product.service.IServiceBookProductSaleService;
import com.ruoyi.common.core.text.Convert;

/**
 * 商品出售记录Service业务层处理
 * 
 * @author Administrator
 * @date 2021-03-06
 */
@Service
public class ServiceBookProductSaleServiceImpl implements IServiceBookProductSaleService 
{
    @Autowired
    private ServiceBookProductSaleMapper serviceBookProductSaleMapper;

    /**
     * 查询商品出售记录
     * 
     * @param id 商品出售记录ID
     * @return 商品出售记录
     */
    @Override
    public ServiceBookProductSale selectServiceBookProductSaleById(Long id)
    {
        return serviceBookProductSaleMapper.selectServiceBookProductSaleById(id);
    }

    /**
     * 查询商品出售记录列表
     * 
     * @param serviceBookProductSale 商品出售记录
     * @return 商品出售记录
     */
    @Override
    public List<ServiceBookProductSale> selectServiceBookProductSaleList(ServiceBookProductSale serviceBookProductSale)
    {
        return serviceBookProductSaleMapper.selectServiceBookProductSaleList(serviceBookProductSale);
    }

    /**
     * 新增商品出售记录
     * 
     * @param serviceBookProductSale 商品出售记录
     * @return 结果
     */
    @Override
    public int insertServiceBookProductSale(ServiceBookProductSale serviceBookProductSale)
    {
        return serviceBookProductSaleMapper.insertServiceBookProductSale(serviceBookProductSale);
    }

    /**
     * 修改商品出售记录
     * 
     * @param serviceBookProductSale 商品出售记录
     * @return 结果
     */
    @Override
    public int updateServiceBookProductSale(ServiceBookProductSale serviceBookProductSale)
    {
        return serviceBookProductSaleMapper.updateServiceBookProductSale(serviceBookProductSale);
    }

    /**
     * 删除商品出售记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteServiceBookProductSaleByIds(String ids)
    {
        return serviceBookProductSaleMapper.deleteServiceBookProductSaleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商品出售记录信息
     * 
     * @param id 商品出售记录ID
     * @return 结果
     */
    @Override
    public int deleteServiceBookProductSaleById(Long id)
    {
        return serviceBookProductSaleMapper.deleteServiceBookProductSaleById(id);
    }
}
